<style type="text/css"> input, btn.btn-class-closeFakeModal{margin-top: 40px;} .col-xs-12 *{font-size: 15px;font-weight: bold;} li{height: 60px;line-height: 60px;border-top: 1px solid #f2f2f2;} </style>
<div class="wapper" id="userSafe">
		<div class="col-xs-12 col-sm-4 col-sm-offset-4 text-center bg-theme" style="height: 50px;line-height:50px;position: fixed;margin-top: 0px;left: 0px;z-index: 100;">
			<a class="glyphicon glyphicon-chevron-left " onclick="backPage()" style="cursor:pointer;color: white;font-size: 20px;position: absolute;top:50%;left:10px;transform:translateY(-50%);"></a>
			<strong style="font-size: 20px;color: white;">账号安全</strong>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4 text-center" >
			<div style="height: 50px;" class="br"></div>
			<input id="pass" type="password" placeholder="请输入原来密码" class="form-control input-lg"  />
			<input id="npass1" type="password" placeholder="新密码" class="form-control input-lg"/>
			<input id="npass2" type="password" placeholder="再次输入新密码" class="form-control input-lg" />
			<input id="submit" type="submit" class="form-control input-lg btn btn-primary" style="background: ;color: balck;font-size: 20px;" value="确认修改"/>
		</div>
		<div class="modal-div-fakeModal" id="div-i-noticeGenDan">
			<div class="div-c-modalContent">
				<h3 class="fakemodal-title"></h3>
				<div class="fakemodal-content"></div>
				<div class="fakemodal-btnsGroup"><button class="btn btn-default btn-class-closeFakeModal">关闭</button></div>
			</div>
		</div>	
	</div>		
<script type="text/javascript">
		$(function(){
			$("#submit").click(function(){
				if ("${user.state}" === "2") {
					bindLayerLittle("提示：", "试玩账号无法修改密码，请注册正式账号");
					return;
				}
				if(!$("#pass").val().trim()){
					bindLayerLittle("提示：", "旧密码不能为空");
					return false;
					}
				if(!checkPassWord($("#npass1").val())){
					bindLayerLittle("提示：", "密码必须由字母数字组成，大于6位且小于16位");
					return false;
					}
				if($("#npass1").val()!=$("#npass2").val()){
					bindLayerLittle("提示：", "两次密码输入不一致");
					return false;}
				$.ajax({
					url:'/u/changePass.do',
					type:'post',
					data:{pass:$("#pass").val(),npass:$("#npass1").val()},
					success:function(data){
						if(data == 50) { 
							save.push("sy");
							bindSetData("login"); 
							return;
			   			}else if(data==60){
			   				pagePreserve();
			   				return;
			   			}
						bindLayerLittle("提示：", data.data);
					},
				});
			});
		});
	</script>

